home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-17 | 10.2 KB | 255 lines | [TEXT/MPS ] |
- #
- # ****************************************************************************
- #
- # File Name: PowerPoint.vu
- #
- # Contains: Quick look test script for MSPowerPoint version 4.0
- #
- # Written by: Kevin Avoy, Ken Landreth, Michael Leong, Gil Spencer et al
- #
- # Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
- #
- # ****************************************************************************
- # C h a n g e H i s t o r y (most recent first):
- # ****************************************************************************
- #
- # Vers Date Author Description
- # ---- -------- ------ ---------------------------------------------
- # <1.0.6> 9/30/93 KTA Initialize gFileName prior to gApptitle being updated by
- # launchTwitch().
- # <1.0.2> 6/16/93 NAGA Renaming InitGlobals(ScriptLevel)to InitGlobals(ScriptLevel)
- # <1+> 5/25/93 NAGA Adding header and porting old files to follow new standards
- #
- # ****************************************************************************
- #
-
-
-
- ########################################################################
- # External libraries
- #=======================================================================
- Libraries "Output.Lib", "DoTasks.Lib","Draw.Lib","UserInterface.Lib", "Font.Lib", "Globals.Lib", "LaunchQuit.Lib", "TCS.Lib";
-
-
- #########################################################################
- ######## Application Specific Tasks
- #########################################################################
-
- #########################################################################
- # InitAppGlobals()
- #========================================================================
- # Author: KL
- # Description: Sets up the tool palette for MSPowerPoint. This task
- # must be called first.
- # Parameters: None
- # Returns: Nothing
- # Examples: InitAppGlobals()
- #========================================================================
- # History:
- #
- ########################################################################
- task InitAppGlobals()
- begin
-
- logstr("setting up {global gApptitle}'s globals");
- global kClick, kDrag, kMultiDrag, kMultiClickDrag, kMultiClick;
- global kPalDocWind, kPalWind, kPullOffPal, kPopUpPal, kScrollPal;
- global kToolPaletteNum := 1;
- global kTextAttribPaletteNum := 2;
-
- global gPaletteList := {
- { #### Start Palette #1 - Tools
- {1,44,29,203,0}, # Location of tools palette relative to the window
- kPalDocWind, # Palette type
- {1,8}, # Size of Tool matrix {numElemsWide,numElemsTall}
- {0,20}, # Offset between tools {h,v}
- 0, # Not used at this time
- 0 # Not used at this time
- }, #### End Palette #1
-
- { #### Start Palette #2 - TextAttrib
- {168,23,268,39,0}, # Location of TextAttrib palette relative to the window
- kPalDocWind, # Palette type
- {5,1}, # Size of Tool matrix {numElemsWide,numElemsTall}
- {21,0}, # Offset between tools {h,v}
- 0, # Not used at this time
- 0 # Not used at this time
- } #### End Palette #2
-
- };
-
-
- ### MSPowerPoint {Flag, Pattern, Line, Color}
- ### Palette Elements:= Tool#, Pal#, ToolName, ToolType, DblClktoEnd SetAttributes
- global SelectTool := { 1, 1, "Select", kClick, 0, {0} };
- global TextTool := { 2, 1, "Text", kClick, 0, {} };
- global LineTool := { 3, 1, "Line", kDrag, 0, {0} };
- global ArcTool := { 4, 1, "Arc", kDrag, 0, {0} };
- global FreeFormTool := { 5, 1, "FreeForm", kMultiClick, 1, {0} };
- global RectTool := { 6, 1, "Rect", kDrag, 0, {0} };
- global EllipseTool := { 7, 1, "Ellipse", kDrag, 0, {0} };
- global ShapeTool := { 8, 1, "Shape", kDrag, 0, {0} };
-
- global BoldTextTool := { 1, 2, "BoldText", 0, 0, {0} };
- global ItalicTextTool := { 2, 2, "ItalicText", 0, 0, {0} };
- global UnderlineTextTool := { 3, 2, "UnderlineText", 0, 0, {0} };
- global ShowdowTextTool := { 4, 2, "ShowdowText", 0, 0, {0} };
- global BulletTool := { 5, 2, "Bullet", 0, 0, {0} };
-
-
- global PromoteTool := {'', { 18, 31,1}, "Promote", 0, 0, {0} };
- global DemoteTool := {'', { 39, 31,1}, "Demote", 0, 0, {0} };
- global MoveUpTool := {'', { 63, 31,1}, "MoveUp", 0, 0, {0} };
- global MoveDownTool := {'', { 81, 31,1}, "MoveDown", 0, 0, {0} };
- global IncTextSizeTool := {'', { 146, 26,1}, "IncTextSize", 0, 0, {0} };
- global DecTextSizeTool := {'', { 146, 35,1}, "DecTextSize", 0, 0, {0} };
- global LineObjTool := {'', { 293, 31,1}, "LineObj", 0, 0, {0} };
- global FillObjTool := {'', { 312, 31,1}, "FillObj", 0, 0, {0} };
- global ShadowObjTool := {'', { 333, 31,1}, "ShadowObj", 0, 0, {0} };
- global PickUpStyleTool := {'', { 365, 31,1}, "PickUpStyle", 0, 0, {0} };
- global ApplyStyleTool := {'', { 386, 31,1}, "ApplyStyle", 0, 0, {0} };
- global SlideShowTool := {'', {-109, 31,3}, "SlideShow", 0, 0, {0} };
- global ZoomInTool := {'', { -36, 25,3}, "ZoomIn", 0, 0, {0} };
- global ZoomOutTool := {'', { -36, 34,3}, "ZoomOut", 0, 0, {0} };
- global HomeScaleTool := {'', { -18, 31,3}, "HomeScale", 0, 0, {0} };
-
- global PrevSlideTool := {'', { 16,232,1}, "PrevSlide", 0, 0, {0} };
- global NextSlideTool := {'', { 15,-26,2}, "NextSlide", 0, 0, {0} };
-
- global NewSlideTool := {'', { 17, -9,2}, "NewSlide", 0, 0, {0} };
-
- global SlideViewTool := {'', {162, -10,2}, "SlideView", 0, 0, {0} };
- global NotesViewTool := {'', {183, -10,2}, "NotesView", 0, 0, {0} };
- global SlideSorterViewTool := {'', {204, -10,2}, "SlideSorterView", 0, 0, {0} };
- global OutlineViewTool := {'', {225, -10,2}, "OutlineView", 0, 0, {0} };
-
- global gToolList:={ LineTool,
- ArcTool,
- FreeFormTool,
- RectTool,
- EllipseTool,
- ShapeTool
- };
-
- global gWindowInset := {35,45,20,20};
-
- ### font characteristic lists
- global gFontSizeList := {'9','10','12','14','18','24','36','48','60','72','96'};
- global gFontStyleList := {'Bold','Italic','Outline', 'Underline','Shadow',
- 'Emboss', 'Superscript', 'Subscript'};
-
- ### Name of the Plain (style) menu item ####
- global gPlainStyle := "Plain"; # Plain-Style menu item
-
- ### How to get to the next line
- global gNextLineMethod := 1;
- ### 1 - ReturnKey, 2 - EnterKey, 3 - DownArrow Key, 4 - TabKey, {} - Move/Click, {'Untitled'} - Move relative to the window titled 'Untitled' /Click
-
- ### Does moving to the next line clear all font info
- global gNextLineClearsFontSettings := 0;
-
- end; #InitAppGlobals
-
- #########################################################################
- # Views()
- #========================================================================
- # Author:
- # Description: Change views.
- # Parameters: None
- # Returns: Nothing
- # Examples: Views();
- # Assumptions: None
- # Applications: MSPowerPoint
- #========================================================================
- # History:
- #
- ########################################################################
- task Views() begin
- LogStr( "Changing Views");
- SelectMenuItem("25%", "View");
- SelectMenuItem("33%", "View");
- SelectMenuItem("50%", "View");
- SelectMenuItem("66%", "View");
- SelectMenuItem("200%", "View");
- SelectMenuItem("400%", "View");
- SelectMenuItem("Actual Size", "View");
- SelectMenuItem("Notes", "View");
- SelectMenuItem("Slide Sorter", "View");
- SelectMenuItem("Outline", "View");
- SelectMenuItem("Slides", "View");
- end;
-
- #########################################################################
- # PowerPointSetupDoText()
- #========================================================================
- # Author: ML
- # Description: Setup document for DoText()
- # Parameters: None
- # Returns: Nothing
- # Examples: PowerPointSetupDoText();
- # Assumptions: None
- # Applications: PowerPoint
- #========================================================================
- # History:
- #
- #########################################################################
- task PowerPointSetupDoText()
- begin
- logstr("Setting up for DoText()...");
- settool(global TextTool);
- MoveRelativeToWindow();
- pressmouse;
- Wait(1);
- releasemouse;
- end;
-
- #########################################################################
- # PowerPointSetupDoDraw()
- #========================================================================
- # Author: ML
- # Description: Setup document for DoDraw()
- # Parameters: None
- # Returns: Nothing
- # Examples: PowerPointSetupDoDraw();
- # Assumptions: None
- # Applications: PowerPoint
- #========================================================================
- # History:
- #
- #########################################################################
- task PowerPointSetupDoDraw()
- begin
- logstr("Setting up for DoDraw...");
- ScrollWindow('H',0,1); # gets back to content region
- end;
-
- ################################################################################
- #################### Main script ####################
- ################################################################################
- script PowerPoint (ScriptLevel:= -1)
- begin
- InitGlobals(ScriptLevel); # initialize your general globals
- InitDraw();
- InitFonts();
- global gAppTitle := 'PowerPoint';
- global gAppVersion := '4'; # version of app you will be running
- global gFileName := "@!@-{gBuildVers}-{gAppTitle}"; # This is used in SaveAs when saving files
- SuiteStart('PowerPoint.vu'); # begin a new test suite
- if LaunchTwitch("{gAppTitle}",gAliasDirectory) # launch or twitch to your app
- begin
- global gSetupDoText:= task PowerPointSetupDoText; # define app specific task
- global gDoDrawHook1 := task PowerPointSetupDoDraw;
- InitAppGlobals(); # init app specific globals
- (*
- *)
- DoSetUpApp(,,,,1,1);
- DoDraw();
- DoText();
- # logstr("!@#$% Expected Error above: The Font styles Emboss, Superscript and Subscript are
- # not always enabled");
- Views();
- DoWindow();
- DoCloseApp();
- end; # if LaunchTwitch("{gAppTitle}",gAliasDirectory)
- SuiteEnd();
- end; # script PowerPoint